# -*- coding: utf-8 -*-
# @Time : 2021/3/5 14:59
# @Author : 加钱哥
# @Email : scg@gmail.com
# @File : base_case_one.py
# @Project : xiaobai

from  setting  import  hash_code
import requests
import unittest
from tools.tool_open_yaml import read_one
class BaseCase(unittest.TestCase):
    @classmethod
    def setUpClass(self) -> None:
        datas=read_one()
        data =datas[0].get('data')
        API_URL =datas[0].get('api')
        hash=datas[0].get('hash')
        print("2333333333333333333334444444444444444444444444444")
        if hash:
            if "password" in data:
                data['password'] = hash_code(data['password'])
        requests.post(API_URL, data=data)


